<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    var house = {
      name: "汤臣一品",
      price: 18888888888,
      phone: 18800000000,
      address: "东方之珠斜对面",
      1.88: "你好"
    }
    house.age = "100";
    // 访问对象 对象.属性
    console.log(house.name);
    var p = "price";
    // house[变量] 
    console.log(house[p])
    console.log(house[1.88])

    // 删除对象的属性的操作符 delete 
    console.log(house)
    delete house.address
    console.log(house)

    // 遍历对象
    for (var key in house) {
      // key 代表对象的每个key
      document.write(house[key])
    }

  </script>
</body>

</html>